home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Image Compendium
/
Image Compendium.iso
/
utility
/
gifview
/
gifv.slr
< prev
next >
Wrap
Text File
|
1993-02-17
|
1KB
|
41 lines
;
; GIFV.SLR
; This script shows how to use the IF-LAST-FILE, File-Delete, File-Copy,
; File-Rename, File-Move, File-Error(System Variable), and the power use of
; the Change-Path command.
;
; The purpose of this script is the show how to use a variety of commands in
; a script that actually does something pretty useful(AMAZING)!. This script
; will go to a directory of choice(specified at run time) and will
; automatically create 3 subdirectories (GIF, BMP, and OTHER). It will then
; process the directory and move all of the .GIF files into the GIF
; subdirectory, all of the .BMP files into the BMP subdirectory and the rest
; of the files into a subdirectory called OTHER.
;
; NOTE The format for FILE-COPY is the same as FILE-MOVE. FILE-DELETE and
; FILE-RENAME are documented in the manual.
;
change-path %1
Sub-Create gif
Sub-Create bmp
Sub-Create other
:loop
if-last-file :exit
ifbmp :movetobmp
ifgif :movetogif
file-move other :move-err
goto :donext
:move-err
echo Error in moving file
goto :donext
:movetobmp
file-move bmp :move-err
goto :donext
:movetogif
file-move gif :move-err
goto :donext
:donext
skipnext :exit
goto :loop
:exit